package calendar;

import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.Set;

/**
 * @author LiuYan
 * @date 2021/11/23 14:36
 *
 * ZonedDate、ZonedTime、ZonedDateTime
 */
public class Part18 {
    public static void main(String[] args) {

        Set<String> availableZoneIds = ZoneId.getAvailableZoneIds();
        availableZoneIds.forEach(System.out::println);

        LocalDateTime now = LocalDateTime.now(ZoneId.of("Australia/Lindeman"));
        System.out.println(now);
        LocalDateTime now1 = LocalDateTime.now(ZoneId.of("Asia/Shanghai"));
        ZonedDateTime zonedDateTime = now1.atZone(ZoneId.of("Asia/Shanghai"));
        System.out.println(zonedDateTime);



    }
}
